/*
 * @Author       : 邱狮杰
 * @Date         : 2021-05-20 10:44:08
 * @LastEditTime : 2021-05-20 10:47:08
 * @FilePath     : /wedding-dress-selection/src/utils/sendLikesHttp.ts
 * @Description  : 发送喜欢likes字段的接口 因为被多处用到决定封装起来复用
 */
import { SynchronizationAwaitError } from './index'
import { BaseRequest } from '../http/index'

export async function sendLikeRequest(invitationId: string, openId: string, likes: string) {
  return await SynchronizationAwaitError(BaseRequest({ url: '/add-likes', method: 'POST', data: { invitation_id: invitationId, openid: openId, likes: likes } }), e => {
    return e.data
  })
}
